package io.renren.modules.erp.service;

import com.baomidou.mybatisplus.extension.service.IService;
import io.renren.modules.erp.entity.AccountHead;
import io.renren.modules.erp.entity.MaterialExtend;
import io.renren.modules.erp.vo.MaterialExtendVo4List;
import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface MaterialExtendService extends IService<MaterialExtend> {

    MaterialExtend getMaterialExtend(long id)throws Exception ;
    List<MaterialExtendVo4List> getDetailList(Long materialId) ;
    List<MaterialExtend> getListByMIds(List<Long> idList) ;

    String saveDetials(String inserted, String deleted, String updated, String sortList, Long materialId,String userName) throws Exception;
    int insertMaterialExtend(MaterialExtend materialExtend,String username)throws Exception ;
    int checkIsExist(Long id, String MaterialExtendName)throws Exception ;
    int deleteMaterialExtend(Long id, HttpServletRequest request,String username)throws Exception ;
    int batchDeleteMaterialExtendByIds(String ids, HttpServletRequest request) throws Exception;

    int insertMaterialExtend(String beanJson, HttpServletRequest request) throws Exception;

    int updateMaterialExtend(String beanJson, Long id, HttpServletRequest request)throws Exception ;

    List<MaterialExtend> getMaterialExtendByTenantAndTime(Long tenantId, Long lastTime, Long syncNum)throws Exception ;

    Long selectIdByMaterialIdAndDefaultFlag(Long materialId, String defaultFlag)throws Exception;
}
